package SqlDemo;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import static SqlDemo.user.getInstace;

public class Delete {
    public static void main(String[] args){
        try {

            Connection con = user.getInstace();
            String sql = "delete from score where sno=?";
            PreparedStatement p = con.prepareStatement(sql);
            p.setString(1,"13");
            int i = p.executeUpdate();
            System.out.println(i == 1?"成功":"不成功");
            con.close();
            p.close();
        }  catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
